import java.util.regex.Matcher;
import java.util.regex.Pattern;

public class RexTest {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		// String s =
		// "table('aa','bb',cc)+('ad.get()',ad.getid(),'ad.getdescription()')";
		// String s = "[e]1f60f[/e][1f601]abc";
		String s = "{\"date\":28,\"day\":4,\"hours\":14,\"minutes\":46,\"month\":7,\"seconds\":34,\"time\":1409208394000,\"timezoneOffset\":-480,\"year\":114}";
		// String s =
		// "08-16 10:07:44.590: E/afterTextChanged(32546): a    [e]1f60f[/e][1f601]     [e]1f60f[/e][1f601]     [e]e[/e]1f60f[e]/e[/e][e]1f601[/e]";
		System.out.println(s);

		// Pattern p = Pattern.compile("\\[e\\](.*?)\\[/e\\]");
		// Pattern p = Pattern.compile("\\b((?!\\[e\\](.*?)\\[/e\\])\\w)+\\b");
		// Pattern p = Pattern.compile("[^(?!\\[e\\](.*?){5}\\[/e\\])]");
		// Pattern p = Pattern.compile("\\[(\\w{4,5})\\]");
		// 08-16 03:26:38.420: V/msgStr(22585): [e]1f60[e]1f621[[e]1f637[\e]]

		Pattern p = Pattern.compile("\"date\"{5}");

		Matcher m = p.matcher(s);

		while (m.find()) {

			System.out.println();
			System.out.println(m.group(1) + "    " + m.start() + "    "
					+ m.end());
			// System.out.println(m.group(1) + "    " + m.start(1)+ "    " +
			// m.end(1));

		}
		System.out.println("end");
	}
}
